VERSION 5.00
Begin VB.Form frmStatus 
   BackColor       =   &H00000000&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "VectorNet Bot - Statistics v1.2"
   ClientHeight    =   3195
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8310
   Icon            =   "frmStatus.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3195
   ScaleWidth      =   8310
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame3 
      BackColor       =   &H00000000&
      Caption         =   "AddChat Counter"
      ForeColor       =   &H00FFFF00&
      Height          =   975
      Left            =   4200
      TabIndex        =   24
      Top             =   1800
      Width           =   4095
      Begin VB.Label txtMainWindowAddChat 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   2640
         TabIndex        =   26
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label Label9 
         BackColor       =   &H00000000&
         Caption         =   "Main Chat AddChat:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   25
         Top             =   360
         Width           =   2055
      End
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00000000&
      Caption         =   "Error Message Counter"
      ForeColor       =   &H00FFFF00&
      Height          =   1050
      Left            =   4200
      TabIndex        =   14
      Top             =   645
      Width           =   4095
      Begin VB.Label Label10 
         BackColor       =   &H00000000&
         Caption         =   "Total Server Errors:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   18
         Top             =   360
         Width           =   2415
      End
      Begin VB.Label txtErrorCount 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   2640
         TabIndex        =   17
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label txtErrorBotCount 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   2640
         TabIndex        =   16
         Top             =   720
         Width           =   1335
      End
      Begin VB.Label Label6 
         BackColor       =   &H00000000&
         Caption         =   "Total Bot Errors:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   15
         Top             =   720
         Width           =   2415
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00000000&
      Caption         =   "VectorNet Message Counter"
      ForeColor       =   &H00FFFF00&
      Height          =   2115
      Left            =   0
      TabIndex        =   7
      Top             =   660
      Width           =   4095
      Begin VB.Label Label13 
         BackColor       =   &H00000000&
         Caption         =   "Whispers Received:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   23
         Top             =   1800
         Width           =   2175
      End
      Begin VB.Label txtWhispRecv 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   2640
         TabIndex        =   22
         Top             =   1800
         Width           =   1335
      End
      Begin VB.Label Label11 
         BackColor       =   &H00000000&
         Caption         =   "Messages Whispered:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   21
         Top             =   1440
         Width           =   2775
      End
      Begin VB.Label txtWhispered 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   2640
         TabIndex        =   20
         Top             =   1440
         Width           =   1335
      End
      Begin VB.Label Label4 
         BackColor       =   &H00000000&
         Caption         =   "Messages from Others:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   13
         Top             =   360
         Width           =   2415
      End
      Begin VB.Label Label5 
         BackColor       =   &H00000000&
         Caption         =   "Messages from You:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   12
         Top             =   720
         Width           =   2415
      End
      Begin VB.Label txtMsgCount 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   2640
         TabIndex        =   11
         Top             =   360
         Width           =   1335
      End
      Begin VB.Label txtSentCount 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   2640
         TabIndex        =   10
         Top             =   720
         Width           =   1335
      End
      Begin VB.Label txtServerCount 
         Alignment       =   2  'Center
         BackColor       =   &H00000000&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   255
         Left            =   2640
         TabIndex        =   9
         Top             =   1080
         Width           =   1335
      End
      Begin VB.Label Label7 
         BackColor       =   &H00000000&
         Caption         =   "Messages from Server:"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000FFFF&
         Height          =   255
         Left            =   120
         TabIndex        =   8
         Top             =   1080
         Width           =   2415
      End
   End
   Begin VB.Timer tmrAutoCheck 
      Enabled         =   0   'False
      Interval        =   100
      Left            =   3480
      Top             =   2280
   End
   Begin VB.PictureBox Online 
      Appearance      =   0  'Flat
      BackColor       =   &H00000000&
      ForeColor       =   &H80000008&
      Height          =   615
      Left            =   4365
      Picture         =   "frmStatus.frx":0CCA
      ScaleHeight     =   600.395
      ScaleMode       =   0  'User
      ScaleWidth      =   585
      TabIndex        =   6
      Top             =   60
      Visible         =   0   'False
      Width           =   615
   End
   Begin VB.PictureBox Offline 
      Appearance      =   0  'Flat
      BackColor       =   &H00000000&
      ForeColor       =   &H80000008&
      Height          =   615
      Left            =   4365
      Picture         =   "frmStatus.frx":1328
      ScaleHeight     =   585
      ScaleWidth      =   585
      TabIndex        =   5
      Top             =   45
      Visible         =   0   'False
      Width           =   615
   End
   Begin VB.Timer tmrCheck 
      Enabled         =   0   'False
      Interval        =   2000
      Left            =   3600
      Top             =   1800
   End
   Begin VB.PictureBox Picture2 
      Appearance      =   0  'Flat
      BackColor       =   &H00000000&
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   6840
      Picture         =   "frmStatus.frx":1A16
      ScaleHeight     =   225
      ScaleWidth      =   225
      TabIndex        =   3
      Top             =   240
      Width           =   255
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   5280
      Picture         =   "frmStatus.frx":4708
      ScaleHeight     =   225
      ScaleWidth      =   225
      TabIndex        =   1
      Top             =   240
      Width           =   255
   End
   Begin VB.Line Line1 
      BorderColor     =   &H00FFFFFF&
      X1              =   5085
      X2              =   5085
      Y1              =   90
      Y2              =   570
   End
   Begin VB.Label Label8 
      Alignment       =   2  'Center
      BackColor       =   &H00000000&
      Caption         =   "Statistics are set to ""0"" when bot is closed."
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   255
      Left            =   2160
      TabIndex        =   19
      Top             =   2880
      Width           =   4095
   End
   Begin VB.Label Label3 
      BackColor       =   &H00000000&
      Caption         =   "=  Bot Offline"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   7200
      TabIndex        =   4
      Top             =   240
      Width           =   975
   End
   Begin VB.Label Label2 
      BackColor       =   &H00000000&
      Caption         =   "=  Bot Online"
      ForeColor       =   &H0000FF00&
      Height          =   255
      Left            =   5640
      TabIndex        =   2
      Top             =   240
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackColor       =   &H00000000&
      Caption         =   "Your VectorNet Bot v2.3 Current State is:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   4215
   End
End
Attribute VB_Name = "frmStatus"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()

Set botFSO = CreateObject("Scripting.FileSystemObject")

'check if the file is there or not
If Not botFSO.FileExists(App.Path & "\" & "BotStatus.ini") Then
    'if the file isn't here, write the stats to it therefore creating the file
    'Message Count info
    WriteINI "VectorNet Messages", "From Others", txtMsgCount.Caption, "BotStatus.ini"
    WriteINI "VectorNet Messages", "From You", txtSentCount.Caption, "BotStatus.ini"
    WriteINI "VectorNet Messages", "From Server", txtServerCount.Caption, "BotStatus.ini"
    'Error Count info
    WriteINI "VectorNet Errors", "Server Errors", txtErrorCount.Caption, "BotStatus.ini"
    WriteINI "VectorNet Errors", "Bot Errors", txtErrorBotCount.Caption, "BotStatus.ini"
    'Bot AddChat info
    WriteINI "VectorNet AddChats", "Bot AddChats", txtMainWindowAddChat.Caption, "BotStatus.ini"
    'send the creation of the file message
    AddChat vbGray, "-- Created ", vbGreen, "BotStatus.ini"
    frmStatus.txtMainWindowAddChat.Caption = frmStatus.txtMainWindowAddChat.Caption + 1
  Else
    'if the file is there, read the statistics from it
    'Message Count info
    txtMsgCount.Caption = ReadINI("VectorNet Messages", "From Others", "BotStatus.ini")
    txtSentCount.Caption = ReadINI("VectorNet Messages", "From You", "BotStatus.ini")
    txtServerCount.Caption = ReadINI("VectorNet Messages", "From Server", "BotStatus.ini")
    'Error Count info
    txtErrorCount.Caption = ReadINI("VectorNet Errors", "Server Errors", "BotStatus.ini")
    txtErrorBotCount.Caption = ReadINI("VectorNet Errors", "Bot Errors", "BotStatus.ini")
    'Bot AddChat info
    txtMainWindowAddChat.Caption = ReadINI("VectorNet AddChats", "Bot AddChats", "BotStatus.ini")
End If

'check if the bot is connected or not when stats is first opened
If frmChat.sckVectorNet.State = sckConnected Then
    'bot is connected
    Online.Visible = True
    Offline.Visible = False
  Else
    'bot is not connected
    Online.Visible = False
    Offline.Visible = True
End If

'toggle the auto checker
tmrAutoCheck.Enabled = True

End Sub

Private Sub Form_Unload(Cancel As Integer)

    'Message Count info
    WriteINI "VectorNet Messages", "From Others", txtMsgCount.Caption, "BotStatus.ini"
    WriteINI "VectorNet Messages", "From You", txtSentCount.Caption, "BotStatus.ini"
    WriteINI "VectorNet Messages", "From Server", txtServerCount.Caption, "BotStatus.ini"
    'Error Count info
    WriteINI "VectorNet Errors", "Server Errors", txtErrorCount.Caption, "BotStatus.ini"
    WriteINI "VectorNet Errors", "Bot Errors", txtErrorBotCount.Caption, "BotStatus.ini"
    'Bot AddChat info
    WriteINI "VectorNet AddChats", "Bot AddChats", txtMainWindowAddChat.Caption, "BotStatus.ini"

End Sub

Private Sub tmrAutoCheck_Timer()

'this will refresh the connection status every 1 milisecond
    If frmChat.sckVectorNet.State = sckConnected Then
        'bot is connected
        Online.Visible = True
        Offline.Visible = False
      Else
        'bot is not connected
        Online.Visible = False
        Offline.Visible = True
    End If
    
End Sub
